cd "C:\Users\selfd\Documents\autopartyinstitutionalization\legacy\cps\replication\data\stata"
use "C:\Users\selfd\Documents\autopartyinstitutionalization\legacy\cps\replication\data\stata\stata_replication.dta"
xtset ccode year
xtpcse v2xps_party i.gwf_prior pi1 prior_pi asp_dummy v2x_polyarchy lgdp gwf_pduration gwf_number fsu ussr_sat regime_elecs av_dm, pairwise
est store model1
regsave using "model1.1.dta", replace
use "C:\Users\selfd\Documents\autopartyinstitutionalization\legacy\cps\replication\data\stata\stata_replication.dta"
xtset ccode year
keep if elections == 1
xtpcse v2xps_party i.gwf_prior pi1 prior_pi asp_dummy v2x_polyarchy lgdp gwf_pduration gwf_number fsu ussr_sat av_dm, pairwise
est store model2
regsave using "model1.2.dta", replace
clear
use "C:\Users\selfd\Documents\autopartyinstitutionalization\legacy\cps\replication\data\stata\stata_replication.dta"
xtset ccode year
keep if elections == 2
xtpcse v2xps_party i.gwf_prior pi1 prior_pi asp_dummy v2x_polyarchy lgdp gwf_pduration gwf_number fsu ussr_sat av_dm, pairwise
est store model3
regsave using "model1.3.dta", replace
clear
use "C:\Users\selfd\Documents\autopartyinstitutionalization\legacy\cps\replication\data\stata\stata_replication.dta"
xtset ccode year
keep if elections == 3
xtpcse v2xps_party i.gwf_prior pi1 prior_pi asp_dummy v2x_polyarchy lgdp gwf_pduration gwf_number fsu ussr_sat av_dm, pairwise
est store model4
regsave using "model1.4.dta", replace
clear
use "C:\Users\selfd\Documents\autopartyinstitutionalization\legacy\cps\replication\data\stata\stata_replication.dta"
xtset ccode year
keep if elections == 4
xtpcse v2xps_party i.gwf_prior pi1 prior_pi asp_dummy v2x_polyarchy lgdp gwf_pduration gwf_number ussr_sat regime_elecs av_dm, pairwise
est store model5
regsave using "model1.5.dta", replace

esttab model1 model2 model3 model4 model5 using regression_results.tex, replace